authPrompt: Connect signals to both text and password entries
This is a regression from the transition to password entry. Both
entries need to be connected to the relevant signals, otherwise
username-based login won't ever work.
Currently, there is a dedicated label above the entry to
display the question text. According to the new mockups
for the lock screen, this label doesn't exist; instead,
the question is set inside the entry itself, as a hint
text.
Set the questions as hint texts of the entry, and remove
the now unused label.
Umang Jain [Fri, 17 Jan 2020 06:47:34 +0000 (12:17 +0530)]
userWidget: Adapt if user is not mentioned for username login
If username-based login flow is followed, we need a default avatar
for the userWidget. Hence, check if the user passed to userWidget
is (null) which implies a username-based login flow.
Umang Jain [Tue, 14 Jan 2020 18:27:02 +0000 (23:57 +0530)]
theme: Add top padding to unlock-dialog-clock-time
The (imaginary) center line for clock time of unlock dialog and the
user avatar should be the same. Since the clock font is 64pt, we need
32pt padding (or 42px).
Umang Jain [Tue, 14 Jan 2020 14:53:36 +0000 (20:23 +0530)]
userWidget: Allow vertical orientation for user avatars
Allow vertical orientation for the userWidget so that the user-avatar
can be centered and user's name can be placed below it. The plan
for 3.36 is to use this vertical userWidget layout for both lock
and login screen.
The userWidget is also used while creating the user-selection list
at the login, hence we still need to keep the horizontal layout
for userWidget in place.
Florian Müllner [Wed, 12 Feb 2020 18:46:44 +0000 (19:46 +0100)]
theme: Make base icon size font-relative
Most icons are used along-side text, like the top bar or menus.
It therefore makes sense for them to adjust along-side the text
when the text-scaling changes.
Jonas Dreßler [Tue, 11 Feb 2020 19:19:50 +0000 (20:19 +0100)]
unlockDialog: Multiply blur sigma value with the scale factor
Since the blur sigma decides how many pixels get factored in when
blurring and setting a scale factor increases the background texture by
that factor, the sigma value should also be multiplied by the scale
factor.
If we modify the paint volume to make it larger and include the blur
radius, we should also use the gained size and draw something there.
Since the framebuffers are only the size of the actor to blur, we're not
doing that right now anyway, so remove the vfunc override.
Jonas Dreßler [Mon, 10 Feb 2020 14:34:57 +0000 (15:34 +0100)]
blur-effect: Use sigma value instead of blur radius
Almost all implementations, including CSS [1] of gaussian blurs use the
sigma/standard deviation value as the input parameter, even if they call
that value "radius". Since using sigma is more correct mathematically
and avoids confusion for people used to other blur implementations, use
that parameter here, too.
Jonas Dreßler [Mon, 10 Feb 2020 14:34:03 +0000 (15:34 +0100)]
blur-effect: Implement incremental calculation of gauss coefficient
Use the shader for linear sampling and incremental calculation of the
gaussian kernel values as it was implemented by Patrick Walton in
webrender.
The sigma value for the blur (the standard deviation) is calculated by
taking the blur radius and dividing it by 3, this value is used by most
implementations of gaussian blurs since it covers a high percentage of
the gaussian shape.
The linear sampling optimization is implemented by skipping every second
texel (i += 2) in the for-loop that's sampling adjacent texels.
Jonas Dreßler [Mon, 10 Feb 2020 14:22:33 +0000 (15:22 +0100)]
blur-effect: Floor downscaled frambuffer sizes
Floor the downscaled size of the new framebuffer to make sure we don't
initialize a framebuffer with a floating point value that might be
interpreted wrong by `cogl_texture_2d_new_with_size` and end up with a
slightly wrong aspect ratio of the framebuffer.
This fixes situations where the widths or heights of downscaled
framebuffers sometimes miss some pixels at the border.
While at it, remove the `downscale_factor` argument from
`setup_projection_matrix` since that function doesn't need the initial
size of the actor anyway.
Florian Müllner [Sat, 30 Nov 2019 18:52:42 +0000 (19:52 +0100)]
extensions-tool: Add option to list updates
Now that we support extension updates, it may be useful to list
pending updates from the command line. It's easy enough to support,
so add a corresponding option to the list command.
AuthPrompt is the set of actors that contain the user avatar,
the username, and the password entry. With the removal of the
screen shield, the unlock dialog (be it UnlockDialog or the
LoginDialog) is always created, and in the case of UnlockDialog,
so is the auth prompt.
This is problematic, though, since for passwordless accounts,
the simple act of creating AuthPrompt authenticates the user,
and lifts the lock screen.
This is the layout manager responsible for ensuring
that the clock is always at the third of the screen
height, and the notifications can push it to above.
This gives the lock shield actor another role: instead of
being the interactive screen shield, make it the invisible
actor that prevents interacting with windows while the
unlock dialog is sliding down.
Activating a dialog is slightly different from opening it; the
former is about showing the user authentication widgetry, while
the latter is about creating it and pre-allocating the necessary
resources.
In addition to that, remove the ClutterBoxLayout that is set as
the layout manager of the Unlock Dialog, and apply the primary
monitor constraint to the child St.BoxLayout instead.
The use of the core idle monitor means that focus change events
are also delayed by keyboard interaction. Since the magnifier is
already in the business of pointer tracking, it's easy enough to
fire the pointer rest timeout from here, so focus changes are
accumulated and delayed.
Carlos Garnacho [Thu, 6 Feb 2020 09:56:44 +0000 (10:56 +0100)]
magnifier: Ignore repeated a11y events
We may get several a11y events setting the caret on the same
coordinates it previously was. Make focus tracking ignore those,
as we're jumping to the same coordinates again during eg. mouse
operation.
Carlos Garnacho [Thu, 6 Feb 2020 09:38:50 +0000 (10:38 +0100)]
magnifier: Clip all crosshair lines at even distances
If the crosshair is clipped so it doesn't cover the pointer cursor,
the clip rectangle is skewed towards the bottom/right. This was
made so to accomodate the default pointer, but the unevenness stays
on other pointer cursors, and it makes the crosshair look odd on
short crosshair length.
Make all lines clip to an even distance from the center instead.
Carlos Garnacho [Thu, 6 Feb 2020 09:33:27 +0000 (10:33 +0100)]
magnifier: Apply color inversion to crosshairs/pointer
It is somewhat unexpected that crosshair color and pointer cursor colors
remain the same across changes in color inversion settings, and may lead
to contrast issues. Apply the effect on the common container, so it
applies to these all.
Daniel van Vugt [Wed, 22 Jan 2020 08:40:50 +0000 (16:40 +0800)]
dnd: Make DND translation-property-aware
Previously DND only worked properly for actors with zero translation.
But it only requires a small tweak to `this._dragOffsetX/Y` to support
non-zero translation values.